<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	<h:head>
		<title>Bank of Quebec</title>
	</h:head>
    <h:body>
    	<h:outputStylesheet library="css" name="inputStyle.css" />
 		<h:form>
 			<div id="container" style="width:1145px">
	 			<div>
	 				<h:graphicImage library="images" name="main_logo_md.png" />
	 				<center><p class="title_boq">Client Creation</p></center>
			 		<table align="center">
			 			<tr>
					    <td width="150px">Identification Type</td>
					    <td>
					    	<h:selectOneMenu value="#{clientManagedBean.client.identificationType}" style="width: 150px" required="true" id="bill">
		    					<f:selectItem itemValue="#{null}" itemLabel="-- select one --" />
		    					<f:selectItems value="#{clientManagedBean.identificationTypes.entrySet()}" var="entry" itemValue="#{entry.key}" itemLabel="#{entry.value}" />
							</h:selectOneMenu>
					    </td>
					  </tr>
					  <tr>
					    <td>Identification</td>
					    <td>
					    	<h:inputText id="clientId" 
					             value="#{clientManagedBean.client.idNumber}" 
					             required="true" size="25"
					             validator="#{clientManagedBean.checkClientId}">
							</h:inputText>
					    </td>
					  </tr>
					  <tr>
					    <td>Name</td>
					    <td>
					    	<h:inputText id="clientName" 
					             value="#{clientManagedBean.client.name}" 
					             required="true" size="25">
							</h:inputText>
					    </td>
					  </tr>
					  <tr>
					    <td>Address</td>
					    <td>
					    	<h:inputText id="clientAddress" 
					             value="#{clientManagedBean.client.address}" 
					             required="true" size="25">
							</h:inputText>
					    </td>
					  </tr>
					  <tr>
					    <td>Telephone</td>
					    <td>
					    	<h:inputText id="clientTelephone" 
					             value="#{clientManagedBean.client.telephone}" 
					             required="true" size="25"
					             validator="#{clientManagedBean.checkClientTelephone}">
							</h:inputText>
					    </td>
					  </tr>
					  <tr>
					    <td>Password</td>
					    <td>
					    	<h:inputSecret id="clientPass" 
					             value="#{clientManagedBean.client.password}" 
					             required="true" size="25"
					             validator="#{clientManagedBean.checkClientPasswordIntegrity}">
							</h:inputSecret>
					    </td>
					  </tr>
					  <tr>
					  	<td colspan="2" align="center">
					  		<h:commandButton action="#{clientManagedBean.createClient}"  image="/resources/images/create_button.png"/>
					  	</td>
					  </tr>
					</table>
					<h:messages style="color:red;margin:8px;" />
				</div>
		 	</div>
 		</h:form>
    </h:body>
</html>